# Contributor: Kevin Daudt <kdaudt@alpinelinux.org>
# Maintainer: Kevin Daudt <kdaudt@alpinelinux.org>
pkgname=icdiff
pkgver=1.9.5
pkgrel=2
pkgdesc="Improved colored diff"
url="https://www.jefftk.com/icdiff"
arch="noarch"
license="Python-2.0"
depends="python3 py3-setuptools"
makedepends="python3-dev bash"
checkdepends="py3-flake8"
source="https://github.com/jeffkaufman/icdiff/archive/release-$pkgver.tar.gz
	fix-flake8-binary.patch
	fix-python-interpreter.patch
	disable-git-diff-test.patch
	"
builddir="$srcdir/icdiff-release-$pkgver"

prepare() {
	default_prepare

	# patch removes executable bit
	chmod +x test.sh icdiff
}

build() {
	python3 setup.py build
}

check() {
	./test.sh python3
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="f4c50da1e73a1af2fd63feabfd180125637a856a8757356eb3b48bbc21871f36a2c876acd2e2ba9d354c8f6e658f6e262fbbfd65fa4078d0adebc1353d87e40a  release-1.9.5.tar.gz
fc6fa3c98b245a9ce1830428c1d59b37f75faaab00dbf44a6d78f84318cfb4bf3fdc826fc86b9ca8a9efbd2a760223525270ea79e4d761e64d4a18597693eb64  fix-flake8-binary.patch
949b3935c44ea2982949bf2389023f091a7e96d61bd05561cddf1f4baccb13da7bf138ac1707e5727190703f539ddca8ddacb79546d6d35a14a4e7e6c63685e4  fix-python-interpreter.patch
e4aefafc7cb9c94ea4d526f79916bd4e945bfcd3c6661ae69fc45e99ed3f399ed6d321ca9ebc44590367814f4b0feadcbeb55c3662528dda7b5919c2104651a4  disable-git-diff-test.patch"
